<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/html">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>科研团队识别</title>
    <!-- LOADING STYLESHEETS -->
    <link href="css/bootstrap.css" rel="stylesheet">
    <link href="css/font-awesome.min.css" rel="stylesheet">
    <link href="css/style.css" rel="stylesheet">
</head>

<body>

<!-- END LOGO-->
<!-- TOP NAVIGATION -->
<div class="container-fluid">
    <div class="navigation">
        <div class="row">
            <ul class="topnav">
                <li></li>
                <li>
                    <a href="/scidata/team">
                        <i class="fa fa-search-plus"></i>科研团队识别</a>
                </li>
                <li>
                    <a href="/scidata/project/all">
                        <i class="fa fa-location-arrow"></i>项目成果追踪</a>
                </li>
                <li>
                    <a href="/scidata/paper">
                        <i class="fa fa-book"></i>学科交叉分析</a>
                </li>
            </ul>
        </div>
    </div>
</div>
<!-- END TOP NAVIGATION -->
<!-- SEARCH FIELD AREA -->
<div class="searchfield bg-hed-six">
    <div class="container" style="padding-top: 20px; padding-bottom: 20px;">
        <div class="row text-center margin-bottom-20">
            <h1 class="white"> 科研团队搜索</h1>
<#--            <span class="nested"> Learn to use gomac </span>-->
        </div>
        <br>
        <div class="row search-row">
            <form name="search_form" action="/scidata/team" onsubmit="return verify(this)">
            <div class="form-group">
                <select class="myselect btn btn-info btn-lg" name="myselect" id="select123" style="font-size: 20px;height: 50px;margin-top:-6px;">
                    <option value ="field" style="color: black">研究领域</option>
                    <option value ="name" style="color: black">学者姓名</option>
                </select>
                <input type="text" class="search" name="field" class="form-control" placeholder=${field}>
                <button class="buttonsearch btn btn-info btn-lg">搜索</button>
<#--                <div class="radio" style="float: left">-->
<#--                    <label><input type="radio" name="matchRule" value="1">完全匹配</label>-->
<#--                </div>-->
<#--                <div class="radio" style="float:left; margin-left: 10px;">-->
<#--                    <label><input type="radio" name="matchRule" value="0">模糊匹配</label>-->
<#--                </div>-->
<#--                <div style="float:left; margin-left: 35px;">排序规则：-->
<#--                    <#if rankRule == "default">-->
<#--                        <a href="/" class="rank">默认</a>-->
<#--                    <#else>-->
<#--                        <a href="/">默认</a>-->
<#--                    </#if>-->
<#--                    <#if rankRule == "chengguo">-->
<#--                        <a href="/teamSearch?rankRule=chengguo&field=${field}&pageNum=${pageInfo.pageNum}&myselect=${select}&matchRule=${matchRule}" class="rank">成果数</a>-->

<#--                    <#else>-->
<#--                        <a href="/teamSearch?rankRule=chengguo&field=${field}&pageNum=${pageInfo.pageNum}&myselect=${select}&matchRule=${matchRule}">成果数</a>-->

<#--                    </#if>-->
<#--                    |-->
<#--                    <#if rankRule == "hindex">-->
<#--                        <a href="/teamSearch?rankRule=hindex&field=${field}&pageNum=${pageInfo.pageNum}&myselect=${select}&matchRule=${matchRule}" class="rank">H-index</a>-->

<#--                    <#else>-->
<#--                        <a href="/teamSearch?rankRule=hindex&field=${field}&pageNum=${pageInfo.pageNum}&myselect=${select}&matchRule=${matchRule}">H-index</a>-->
<#--                    </#if>-->
<#--                </div>-->
            </div>
<#--            <input type="text" class="search" placeholder="What do you need help with?">-->
<#--            <button class="buttonsearch btn btn-info btn-lg">搜索</button>-->
            </form>
        </div>

    </div>
</div>
<!-- END SEARCH FIELD AREA -->
<!-- MAIN SECTION -->
<div class="container featured-area-default padding-30">
    <div class="row">
        <!-- ARTICLE OVERVIEW SECTION -->
        <div class="col-md-12 padding-20">
            <div class="row">
                <!-- BREADCRUMBS -->
<#--                <div class="breadcrumb-container">-->
<#--                    <ol class="breadcrumb">-->
<#--                        <li>-->
<#--                            <a href="index.html">-->
<#--                                <i class="fa fa-home"></i>-->
<#--                            </a>-->
<#--                        </li>-->
<#--                        <li class="active">All Articles</li>-->
<#--                    </ol>-->
<#--                </div>-->
                <!-- END BREADCRUMBS -->
                <!-- ARTICLES -->
                <div class="fb-heading">
                    搜索结果
                </div>
                <hr class="style-three">
                <#list teams as team>
                    <div class="panel panel-default col-md-12">
                        <div class="col-md-8">
                            <div class="article-heading-abb">
                                <a href="/scidata/team/teamDetail?team_id=${team.getTeam_id()?c}" target="_blank ">
                                    <i class="fa fa-pencil-square-o"></i>${team.getLeader_name()} 团队</a>
                            </div>
                            <div class="article-info">
                                <div class="art-date">
                                    <a href="#">
                                        <i class="fa fa-calendar-o"></i>单位：${team.getAffiliation()}</a>
                                </div>
                                <#--                        <div class="art-category">-->
                                <#--                            <a href="#">-->
                                <#--                                <i class="fa fa-folder"></i> Account Settings </a>-->
                                <#--                        </div>-->
                                <#--                        <div class="art-comments">-->
                                <#--                            <a href="#">-->
                                <#--                                <i class="fa fa-comments-o"></i> 4 Comments </a>-->
                                <#--                        </div>-->
                            </div>
                            <div class="article-content">
                                <p class="block-with-text">
                                    团队负责人：${team.getLeader_name()}&nbsp;&nbsp;<br/>
                                    团队成员：<#list team.getMems() as mem>&nbsp;${mem}</#list>
                                    <br/>发文量：${team.getResutNum()}&nbsp;&nbsp;
                                    被引量：${team.getCited()}<br/>
                                    主要研究领域：
                                    <#if team.getSubject()??>
                                        <#list team.getSubject()?replace(";", "；")?split("；") as key>
                                            <#if key!="" >
                                                <a class="btn btn-default btn-o btn-sm">${key}</a>
                                            </#if>
                                        </#list>
                                    <#else >暂无
                                    </#if>

                                </p>
                            </div>
<#--                            <div class="article-read-more">-->
<#--                                <a href="/team/teamDetail?team_id=${team.getTeam_id()?c}" class="btn btn-default btn-wide">团队详情</a>-->
<#--                            </div>-->
                        </div>
                        <div class="col-md-4">
<#--                            <div id = "chart${team_index}" style="width: 345px;height:255px;"></div>-->
                            <div id = "bar-chart${team_index}" style="width: 345px;height:250px;"></div>
                        </div>
                    </div>
                <div class="panel panel-default">

                </div>
                </#list>

                <!-- END ARTICLES -->

                <!-- PAGINATION -->
                <nav class="text-center">
                    <ul class="pagination">
                        <li class="enabled">
                            <a href="/scidata/team?pageNum=1&&field=${field}">
                                    <span aria-hidden="true">
                                        首页</span>
                            </a>
                        </li>

                        <li class="<#if pageInfo.isHasPreviousPage() == true >enabled<#else >disabled</#if>">
                            <a href="/scidata/team?pageNum=${pageInfo.getPrePage()}&rankRule=${rankRule}&&field=${field}&myselect=${select}" aria-label="Previous">
                                    <span aria-hidden="true">
                                        <i class="fa fa-arrow-circle-left"></i>上一页</span>
                            </a>
                        </li>
                        <#list pageInfo.getNavigatepageNums() as page>
                            <li class="<#if page == pageInfo.getPageNum() >active<#else >enabled</#if>">
                                <a href="/scidata/team?pageNum=${page}&&rankRule=${rankRule}&&field=${field}&myselect=${select}">
                                    ${page}
                                    <span class="sr-only">(current)</span>
                                </a>
                            </li>
                        </#list>
                        <li class="<#if pageInfo.isHasNextPage() == true >enabled<#else >disabled</#if>">
                            <a href="/scidata/team?pageNum=${pageInfo.getNextPage()}&&rankRule=${rankRule}&&field=${field}&myselect=${select}">
                                    <span aria-hidden="true">
                                        下一页<i class="fa fa-arrow-circle-right"></i></span>
                            </a>
                        </li>
                        <li class="enabled">
                            <a href="/scidata/team?pageNum=${pageInfo.getPages()}&&rankRule=${rankRule}&&field=${field}&myselect=${select}">
                                    <span aria-hidden="true">
                                        尾页</span>
                            </a>
                        </li>
                    </ul>
                </nav>
                <!-- END PAGINATION -->
            </div>
        </div>
        <!-- END ARTICLES OVERVIEW SECTION-->

    </div>
</div>

<!-- LOADING MAIN JAVASCRIPT -->
<script src="js/jquery-2.2.4.min.js"></script>
<script src="js/main.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src='js/jquery.okayNav.js'></script>
<script src="js/echarts.min.js"></script>
<script src="js/dataTool.min.js"></script>
<script src="js/jquery.dataTables.min.js"></script>
<script>
    function verify(form) {
        Keyword=form.field.value
        console.log(Keyword)
        if (Keyword.length>=10) {
            alert('输入关键词长度不能大于10');
            return false;
        }
        if (Keyword.trim() == '' || Keyword==null) {
            alert('输入关键词不能为空');
            return false;
        }
    };

    $(document).ready(function () {
        $().ready(function () {

            $sidebar = $('.sidebar');

            $sidebar_img_container = $sidebar.find('.sidebar-background');

            $full_page = $('.full-page');

            $sidebar_responsive = $('body > .navbar-collapse');

            window_width = $(window).width();

            fixed_plugin_open = $('.sidebar .sidebar-wrapper .nav li.active a p').html();

            if (window_width > 767 && fixed_plugin_open == 'Dashboard') {
                if ($('.fixed-plugin .dropdown').hasClass('show-dropdown')) {
                    $('.fixed-plugin .dropdown').addClass('open');
                }
            }

            $('.fixed-plugin a').click(function (event) {
                // Alex if we click on switch, stop propagation of the event, so the dropdown will not be hide, otherwise we set the  section active
                if ($(this).hasClass('switch-trigger')) {
                    if (event.stopPropagation) {
                        event.stopPropagation();
                    } else if (window.event) {
                        window.event.cancelBubble = true;
                    }
                }
            });

            $('.fixed-plugin .active-color span').click(function () {
                $full_page_background = $('.full-page-background');

                $(this).siblings().removeClass('active');
                $(this).addClass('active');

                var new_color = $(this).data('color');

                if ($sidebar.length != 0) {
                    $sidebar.attr('data-color', new_color);
                }

                if ($full_page.length != 0) {
                    $full_page.attr('filter-color', new_color);
                }

                if ($sidebar_responsive.length != 0) {
                    $sidebar_responsive.attr('data-color', new_color);
                }
            });

            $('.fixed-plugin .background-color .badge').click(function () {
                $(this).siblings().removeClass('active');
                $(this).addClass('active');

                var new_color = $(this).data('background-color');

                if ($sidebar.length != 0) {
                    $sidebar.attr('data-background-color', new_color);
                }
            });

            $('.fixed-plugin .img-holder').click(function () {
                $full_page_background = $('.full-page-background');

                $(this).parent('li').siblings().removeClass('active');
                $(this).parent('li').addClass('active');


                var new_image = $(this).find("img").attr('src');

                if ($sidebar_img_container.length != 0 && $('.switch-sidebar-image input:checked').length != 0) {
                    $sidebar_img_container.fadeOut('fast', function () {
                        $sidebar_img_container.css('background-image', 'url("' + new_image + '")');
                        $sidebar_img_container.fadeIn('fast');
                    });
                }

                if ($full_page_background.length != 0 && $('.switch-sidebar-image input:checked').length != 0) {
                    var new_image_full_page = $('.fixed-plugin li.active .img-holder').find('img').data('src');

                    $full_page_background.fadeOut('fast', function () {
                        $full_page_background.css('background-image', 'url("' + new_image_full_page + '")');
                        $full_page_background.fadeIn('fast');
                    });
                }

                if ($('.switch-sidebar-image input:checked').length == 0) {
                    var new_image = $('.fixed-plugin li.active .img-holder').find("img").attr('src');
                    var new_image_full_page = $('.fixed-plugin li.active .img-holder').find('img').data('src');

                    $sidebar_img_container.css('background-image', 'url("' + new_image + '")');
                    $full_page_background.css('background-image', 'url("' + new_image_full_page + '")');
                }

                if ($sidebar_responsive.length != 0) {
                    $sidebar_responsive.css('background-image', 'url("' + new_image + '")');
                }
            });

            $('.switch-sidebar-image input').change(function () {
                $full_page_background = $('.full-page-background');

                $input = $(this);

                if ($input.is(':checked')) {
                    if ($sidebar_img_container.length != 0) {
                        $sidebar_img_container.fadeIn('fast');
                        $sidebar.attr('data-image', '#');
                    }

                    if ($full_page_background.length != 0) {
                        $full_page_background.fadeIn('fast');
                        $full_page.attr('data-image', '#');
                    }

                    background_image = true;
                } else {
                    if ($sidebar_img_container.length != 0) {
                        $sidebar.removeAttr('data-image');
                        $sidebar_img_container.fadeOut('fast');
                    }

                    if ($full_page_background.length != 0) {
                        $full_page.removeAttr('data-image', '#');
                        $full_page_background.fadeOut('fast');
                    }

                    background_image = false;
                }
            });

            $('.switch-sidebar-mini input').change(function () {
                $body = $('body');

                $input = $(this);

                if (md.misc.sidebar_mini_active == true) {
                    $('body').removeClass('sidebar-mini');
                    md.misc.sidebar_mini_active = false;

                    $('.sidebar .sidebar-wrapper, .main-panel').perfectScrollbar();

                } else {

                    $('.sidebar .sidebar-wrapper, .main-panel').perfectScrollbar('destroy');

                    setTimeout(function () {
                        $('body').addClass('sidebar-mini');

                        md.misc.sidebar_mini_active = true;
                    }, 300);
                }

                // we simulate the window Resize so the charts will get updated in realtime.
                var simulateWindowResize = setInterval(function () {
                    window.dispatchEvent(new Event('resize'));
                }, 180);

                // we stop the simulation of Window Resize after the animations are completed
                setTimeout(function () {
                    clearInterval(simulateWindowResize);
                }, 1000);

            });
        });
    });
</script>
<!-- chartist -->
<script>

<#--    <#list teams as tidx>-->
<#--    var chart${tidx_index} = echarts.init(document.getElementById('chart${tidx_index}'));-->
<#--    option${tidx_index} = {-->
<#--        tooltip: {-->
<#--            trigger: 'axis',-->
<#--            axisPointer: {-->
<#--                type: 'cross',-->
<#--                crossStyle: {-->
<#--                    color: '#999'-->
<#--                }-->
<#--            }-->
<#--        },-->
<#--        color: [-->
<#--            "#3fb1e3",-->
<#--            "#6be6c1",-->
<#--            "#626c91",-->
<#--            "#a0a7e6",-->
<#--            "#c4ebad",-->
<#--            "#96dee8"-->
<#--        ],-->
<#--        // toolbox: {-->
<#--        //     feature: {-->
<#--        //         dataView: {show: true, readOnly: false},-->
<#--        //         magicType: {show: true, type: ['line', 'bar']},-->
<#--        //         restore: {show: true},-->
<#--        //         saveAsImage: {show: true}-->
<#--        //     }-->
<#--        // },-->
<#--        legend: {-->
<#--            data: ['发文量', '被引量']-->
<#--        },-->
<#--        xAxis: [-->
<#--            {-->
<#--                type: 'category',-->
<#--                data: [-->
<#--                    <#list tidx.getTeamstats() as ts>-->
<#--                    <#if ts_has_next>-->
<#--                    ${(ts.getYear())?c},-->
<#--                    <#else>-->
<#--                    ${(ts.getYear())?c}-->
<#--                    </#if>-->
<#--                    </#list>-->
<#--                ],-->
<#--                axisPointer: {-->
<#--                    type: 'shadow'-->
<#--                }-->
<#--            }-->
<#--        ],-->
<#--        yAxis: [-->
<#--            {-->
<#--                type: 'value',-->
<#--                name: '数量',-->
<#--                //min: ${tidx.getCmin()},-->
<#--                //max: ${tidx.getCmax()},-->
<#--                //interval: ${tidx.getCinterval()},-->
<#--                axisLabel: {-->
<#--                    formatter: '{value}'-->
<#--                }-->
<#--            }-->
<#--            /*{-->
<#--                type: 'value',-->
<#--                name: '被引量',-->
<#--                min: ${tidx.getCmin()},-->
<#--            max: ${tidx.getCmax()},-->
<#--            interval: ${tidx.getCinterval()},-->
<#--            axisLabel: {-->
<#--                formatter: '{value}'-->
<#--            }-->
<#--        },*/-->

<#--        ],-->
<#--        series: [-->
<#--            {-->
<#--                name: '发文量',-->
<#--                type: 'bar',-->
<#--                itemStyle: {-->
<#--                    normal: {-->
<#--                        label: {-->
<#--                            show: true, //开启显示-->
<#--                            position: 'top', //在上方显示-->
<#--                            textStyle: { //数值样式-->
<#--                                color: 'black',-->
<#--                                fontSize: 10-->
<#--                            }-->
<#--                        }-->
<#--                    }-->
<#--                },-->
<#--                data: [-->
<#--                    <#list tidx.getTeamstats() as ts>-->
<#--                    <#if ts_has_next>-->
<#--                    ${ts.getPaperNum()?c},-->
<#--                    <#else>-->
<#--                    ${ts.getPaperNum()?c}-->
<#--                    </#if>-->
<#--                    </#list>-->
<#--                ],-->
<#--                yAxisIndex: 0-->
<#--            },-->
<#--            {-->
<#--                name: '被引量',-->
<#--                type: 'bar',-->
<#--                itemStyle: {-->
<#--                    normal: {-->
<#--                        label: {-->
<#--                            show: true, //开启显示-->
<#--                            position: 'top', //在上方显示-->
<#--                            textStyle: { //数值样式-->
<#--                                color: 'black',-->
<#--                                fontSize: 10-->
<#--                            }-->
<#--                        }-->
<#--                    }-->
<#--                },-->
<#--                data: [-->
<#--                    <#list tidx.getTeamstats() as ts>-->
<#--                    <#if ts_has_next>-->
<#--                    ${ts.getCitedNum()?c},-->
<#--                    <#else>-->
<#--                    ${ts.getCitedNum()?c}-->
<#--                    </#if>-->
<#--                    </#list>-->
<#--                ],-->
<#--                yAxisIndex: 0-->
<#--            }-->
<#--        ]-->

<#--    };-->

<#--    chart${tidx_index}.setOption(option${tidx_index});-->
<#--    </#list>-->

    <#list teams as tidx>
    var times${tidx_index} = ['2017', '2018', '2019', '2020'];
    var barChart${tidx_index} = echarts.init(document.getElementById('bar-chart${tidx_index}'),'blue');
    // 成果统计图表的配置项和数据
    baroption${tidx_index} = {
        legend: {
            bottom:'bottom'
        },

        tooltip: {},
        dataset: {
            dimensions: ['product', '期刊论文', '会议论文', '专著'],
            source: [
                <#list tidx.teamAgg as states>
                {product: ${states.years}, '期刊论文': ${states.qk}, '会议论文': ${states.hy}, '专著': ${states.zz} }
                <#if states_index != 3>
                ,
                </#if>

                </#list >

            ]
        },
        color: [
            "#3fb1e3",
            "#6be6c1",
            "#626c91",
            "#a0a7e6",
            "#c4ebad",
            "#96dee8"
        ],
        xAxis: {type: 'category'},
        yAxis: {},
        // Declare several bar series, each will be mapped
        // to a column of dataset.source by default.
        series: [
            {type: 'bar',
                itemStyle: {
                    normal: {
                        label: {
                            show: true, //开启显示
                            position: 'top', //在上方显示
                            textStyle: { //数值样式
                                color: 'black',
                                fontSize: 10
                            }
                        }
                    }
                },
            },
            {type: 'bar',
                itemStyle: {
                    normal: {
                        label: {
                            show: true, //开启显示
                            position: 'top', //在上方显示
                            textStyle: { //数值样式
                                color: 'black',
                                fontSize: 10
                            }
                        }
                    }
                },
            },
            {type: 'bar',
                itemStyle: {
                    normal: {
                        label: {
                            show: true, //开启显示
                            position: 'top', //在上方显示
                            textStyle: { //数值样式
                                color: 'black',
                                fontSize: 10
                            }
                        }
                    }
                },
            }
        ]
    };

    if (baroption${tidx_index} && typeof baroption${tidx_index} === "object") {
        barChart${tidx_index}.setOption(baroption${tidx_index});
    }
    </#list>
</script>
<script>
    $(document).ready(function () {
        // Javascript method's body can be found in assets/js/demos.js
        md.initDashboardPageCharts();
    });
</script>
</body>

</html>